/******************************************************** 
* @file    : QHttpHelper.h
* @brief   : brief
* @details : 
* @author  : qh.zhang@atisz.ac.cn
* @date    : 2019-7-25
*********************************************************/
#pragma once

#include <QObject>

class HttpHelper : public QObject
{
	Q_OBJECT

	HttpHelper(QObject *parent);
	~HttpHelper();

public:
	static bool get(const QString& strUrl, QString &strResponse, QVariant& vStatusCode, int nTimeout = 3000);
	static bool put(const QString& strUrl, const QByteArray& strData, QString &strResponse, QVariant& vStatusCode, int nTimeout = 3000);
	static bool post(const QString& strUrl, const QByteArray& strData, QString &strResponse, QVariant& vStatusCode, int nTimeout = 3000);
	static bool del(const QString& strUrl, QString &strResponse, QVariant& vStatusCode, int nTimeout = 3000);
};
